package com.mh.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mh.dao.AssetChangeDao;
import com.mh.dto.vo.R;
import com.mh.pojo.AssetChange;
import com.mh.service.AssetChangeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 资产变动表(AssetChange)表服务实现类
 *
 * @author zmh
 * @since 2025-02-08 09:18:49
 */
@Service
public class AssetChangeServiceImpl extends ServiceImpl<AssetChangeDao, AssetChange> implements AssetChangeService {

    @Autowired
    private AssetChangeDao assetChangeDao;

    /**
     * 分页查询
     *
     * @param page 查询页数
     * @param size 一页显示条数
     * @return ·
     */
    public R<Page<AssetChange>> getAllByPage(int page, int size) {
        Page<AssetChange> assetChangePage = new Page<>(page, size);
        LambdaQueryWrapper<AssetChange> queryWrapper = new LambdaQueryWrapper<>();
        //TODO 查询条件定制
        return R.success(assetChangeDao.selectPage(assetChangePage, queryWrapper));
    }
}

